package com.gxa.modules.service.Impl;

import com.gxa.common.vo.ResultVo;
import com.gxa.modules.mapper.SysUserMapper;
import com.gxa.modules.pojo.SysUser;
import com.gxa.modules.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysUserServiceImpl implements SysUserService {

    @Autowired(required = false)
    private SysUserMapper sysUserMapper;

    @Autowired
    private RedisTemplate redisTemplate;

    @Override
    public ResultVo findSysUserList(Integer page, Integer limit) {
        ResultVo resultVo = new ResultVo();

        redisTemplate.opsForValue().set("keey","gxa");

        List<SysUser> sysUserList = sysUserMapper.findSysUserList();
        resultVo.setCode(200);
        resultVo.setMsg("查询成功");
        resultVo.setData(sysUserList);
        return resultVo;
    }
}
